<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
 * User_profile.php
 *
 * @author  :  Skiychan <dev@skiy.net>
 * @link    :  http://www.zzzzy.com
 * @created :  2015/12/12
 * @modified:
 * @version :  0.0.1
 */

require(APPPATH.'libraries/Web_Controller.php');
class User_profile extends Web_Controller {
    private $_user_info = null;  //用户信息

    public function __construct() {
        parent::__construct();

        $services = array(
            'login_service',
            'user_info_service'
        );
        $this->load->service($services);

        $this->_user_info = $this->login_service->get_user_info();
    }

    /**
     * 获取空间信息
     */
    public function space_get() {
        $ret = $this->user_info_service->get_format_space($this->_user_info['id']);
        if (empty($ret))
            return $this->common_response($this->user_info_service);

        return  $this->common_response(0, '', array('data' =>$ret));
    }

}